package com.quanquan.user.repository;

import com.quanquan.user.entity.IntegralRule;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * 功能描述:
 *
 * @ClassName: SignInRepository
 * @Author: xiaoqianh丶
 * @Date: 2019-04-05 19:08
 * @Version: V1.0
 */
public interface IntegralRuleRepository extends JpaRepository<IntegralRule, String>, JpaSpecificationExecutor<IntegralRule> {

    @Query(value = "select * from oo_integral_rule",nativeQuery = true)
    List<IntegralRule> integralRules();

    @Query(value = "select * from oo_integral_rule where id = ?1",nativeQuery = true)
    IntegralRule findByRuleId(String id);

}
